home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 January: Mac OS SDK / Dev.CD Jan 98 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Universal / Interfaces / RIncludes / Dialogs.r < prev    next >
Encoding:
Text File  |  1997-08-12  |  6.1 KB  |  225 lines  |  [TEXT/MPS ]

  1. /*
  2.      File:        Dialogs.r
  3.  
  4.      Contains:    Dialog Manager interfaces.
  5.  
  6.      Version:    Technology:    System 7.5
  7.                  Release:    Universal Interfaces 3.0.1
  8.  
  9.      Copyright:    © 1985-1997 by Apple Computer, Inc., all rights reserved
  10.  
  11.      Bugs?:        Please include the the file and version information (from above) with
  12.                  the problem description.  Developers belonging to one of the Apple
  13.                  developer programs can submit bug reports to:
  14.  
  15.                      devsupport@apple.com
  16.  
  17. */
  18.  
  19. #ifndef __DIALOGS_R__
  20. #define __DIALOGS_R__
  21.  
  22. #ifndef __CONDITIONALMACROS_R__
  23. #include "ConditionalMacros.r"
  24. #endif
  25.  
  26. #ifndef __MACWINDOWS_R__
  27. #include "MacWindows.r"        /* for 'wctb' */
  28. #endif
  29.  
  30.  
  31. /*----------------------------wctb • Alert Color Lookup Table--------------------------*/
  32. type 'actb' as 'wctb';
  33.  
  34.  
  35. /*----------------------------ALRT • Alert Template-------------------------------------*/
  36. /*
  37.     ALRT_RezTemplateVersion:
  38.         0 - original                             <-- default
  39.         1 - additional positioning info at end    
  40. */
  41. #ifndef ALRT_RezTemplateVersion
  42.     #ifdef SystemSevenOrLater                    /* grandfather in use of “SystemSevenOrLater” */
  43.         #define ALRT_RezTemplateVersion 1
  44.     #else
  45.         #define ALRT_RezTemplateVersion 0
  46.     #endif
  47. #endif
  48.  
  49.  
  50. type 'ALRT' {
  51.         rect;                                                    /* boundsRect            */
  52.         integer;                                                /* 'DITL' ID            */
  53.  
  54.         /* NOTE: the stages are ordered 4, 3, 2, 1 */
  55.         wide array [4] {
  56.                 boolean                 OK, Cancel;             /* Bold Outline         */
  57.                 boolean                 invisible, visible;     /* Draw Alert            */
  58.                 unsigned bitstring[2]    silent = 0
  59.                                 sound1, sound2, sound3;         /* Beeps                */
  60.         };
  61.  
  62. #if ALRT_RezTemplateVersion == 1
  63.     /*    The following are alert positioning options used by System 7.0 and later */
  64.         unsigned integer                noAutoCenter = 0x0000,
  65.                                         centerMainScreen = 0x280a,
  66.                                         alertPositionMainScreen = 0x300a,
  67.                                         staggerMainScreen = 0x380a,
  68.                                         centerParentWindow = 0xa80a,
  69.                                         alertPositionParentWindow = 0xb00a,
  70.                                         staggerParentWindow = 0xb80a,
  71.                                         centerParentWindowScreen = 0x680a,
  72.                                         alertPositionParentWindowScreen = 0x700a,
  73.                                         staggerParentWindowScreen = 0x780a;
  74. #endif
  75. };
  76.  
  77. /* stages for ALRT */
  78. #define silentStage OK, visible, silent
  79. #define silentStages { silentStage; silentStage; silentStage; silentStage; }
  80.  
  81. #define beepStage OK, visible, sound1
  82. #define beepStages { beepStage; beepStage; beepStage; beepStage; }
  83.  
  84.  
  85. /*----------------------------dctb • Dialog Color Lookup Table--------------------------*/
  86. type 'dctb' as 'wctb';
  87.  
  88.  
  89. /*----------------------------DITL • Dialog Item List-----------------------------------*/
  90. type 'DITL' {
  91.         integer = $$CountOf(DITLarray) - 1;                     /* Array size            */
  92.         wide array DITLarray {
  93.                 fill long;
  94.                 rect;                                            /* Item bounds            */
  95.                 switch {
  96.  
  97.                 case HelpItem:                                    /* Help Mgr type item */
  98.                         boolean         enabled,disabled;        /* Enable flag            */
  99.                         key bitstring[7] = 1;                    /* this is a new type = 1 */
  100.  
  101.                         switch {
  102.                             case HMScanhdlg:
  103.                                 byte = 4;                        /* sizeola                */
  104.                                 key int = 1;                    /* key value             */
  105.                                 integer;                        /* resource ID            */
  106.  
  107.                             case HMScanhrct:
  108.                                 byte = 4;                        /* sizeola                */
  109.                                 key int = 2;                    /* key value             */
  110.                                 integer;                        /* resource ID            */
  111.  
  112.                             case HMScanAppendhdlg:
  113.                                 byte = 6;                        /* sizeola                */
  114.                                 key int = 8;                    /* key value             */
  115.                                 integer;                        /* resource ID            */
  116.                                 integer;                        /* offset (zero based)    */
  117.                         };
  118.  
  119.  
  120.                 case Button:
  121.                         boolean         enabled,disabled;        /* Enable flag            */
  122.                         key bitstring[7] = 4;
  123.                         pstring;                                /* Title                */
  124.  
  125.                 case CheckBox:
  126.                         boolean         enabled,disabled;        /* Enable flag            */
  127.                         key bitstring[7] = 5;
  128.                         pstring;                                /* Title                */
  129.  
  130.                 case RadioButton:
  131.                         boolean         enabled,disabled;        /* Enable flag            */
  132.                         key bitstring[7] = 6;
  133.                         pstring;                                /* Title                */
  134.  
  135.                 case Control:
  136.                         boolean         enabled,disabled;        /* Enable flag            */
  137.                         key bitstring[7] = 7;
  138.                         byte = 2;
  139.                         integer;                                /* 'CTRL' ID            */
  140.  
  141.                 case StaticText:
  142.                         boolean         enabled,disabled;        /* Enable flag            */
  143.                         key bitstring[7] = 8;
  144.                         pstring;                                /* Text                 */
  145.  
  146.                 case EditText:
  147.                         boolean         enabled,disabled;        /* Enable flag            */
  148.                         key bitstring[7] = 16;
  149.                         pstring;                                /* Text                 */
  150.  
  151.                 case Icon:
  152.                         boolean         enabled,disabled;        /* Enable flag            */
  153.                         key bitstring[7] = 32;
  154.                         byte = 2;
  155.                         integer;                                /* 'ICON' ID            */
  156.  
  157.                 case Picture:
  158.                         boolean         enabled,disabled;        /* Enable flag            */
  159.                         key bitstring[7] = 64;
  160.                         byte = 2;
  161.                         integer;                                /* 'PICT' ID            */
  162.  
  163.                 case UserItem:
  164.                         boolean         enabled,disabled;        /* Enable flag            */
  165.                         key bitstring[7] = 0;
  166.                         byte = 0;
  167.                 };
  168.                 align word;
  169.         };
  170. };
  171.  
  172.  
  173. /*----------------------------DLOG • Dialog Template------------------------------------*/
  174. /*
  175.     DLOG_RezTemplateVersion:
  176.         0 - original                             <-- default
  177.         1 - additional positioning info at end    
  178. */
  179. #ifndef DLOG_RezTemplateVersion
  180.     #ifdef SystemSevenOrLater                    /* grandfather in use of “SystemSevenOrLater” */
  181.         #define DLOG_RezTemplateVersion 1
  182.     #else
  183.         #define DLOG_RezTemplateVersion 0
  184.     #endif
  185. #endif
  186.  
  187.  
  188. type 'DLOG' {
  189.         rect;                                                    /* boundsRect            */
  190.         integer         documentProc,                            /* procID                */
  191.                         dBoxProc,
  192.                         plainDBox,
  193.                         altDBoxProc,
  194.                         noGrowDocProc,
  195.                         movableDBoxProc,
  196.                         zoomDocProc = 8,
  197.                         zoomNoGrow = 12,
  198.                         rDocProc = 16;
  199.         byte            invisible, visible;                     /* visible                */
  200.         fill byte;
  201.         byte            noGoAway, goAway;                        /* goAway                */
  202.         fill byte;
  203.         unsigned hex longint;                                    /* refCon                */
  204.         integer;                                                /* 'DITL' ID            */
  205.         pstring;                                                /* title                */
  206. #if DLOG_RezTemplateVersion == 1
  207.     /*    The following are window positioning options used by System 7.0 and later */
  208.         align word;
  209.         unsigned integer                noAutoCenter = 0x0000,
  210.                                         centerMainScreen = 0x280a,
  211.                                         alertPositionMainScreen = 0x300a,
  212.                                         staggerMainScreen = 0x380a,
  213.                                         centerParentWindow = 0xa80a,
  214.                                         alertPositionParentWindow = 0xb00a,
  215.                                         staggerParentWindow = 0xb80a,
  216.                                         centerParentWindowScreen = 0x680a,
  217.                                         alertPositionParentWindowScreen = 0x700a,
  218.                                         staggerParentWindowScreen = 0x780a;
  219. #endif
  220. };
  221.  
  222.  
  223. #endif /* __DIALOGS_R__ */
  224.  
  225.